import request from "@/utils/request";
/**
 * 角色列表
 */
export const roleList = (customerId, reformType, stageType) => {
  return request({
    url: `/crm/info/getCustomerStageTask/${customerId}/${reformType}`,
    method: "get",
    params: {
      stageType
    }
  });
};

/**
 * 获取前置任务为空的列表数据
 * @param { string } roleId -角色ID
 * @param { string } customerId -客户ID
 */
export const beforeTaskListByRoleId = (roleId, customerId, reformType) => {
  return request({
    url: `/crm/info/getBeforeTaskList/${roleId}/${customerId}/${reformType}`,
    method: "get"
  });
};

/**
 * 成员列表
 */
export const memberList = params => {
  return request({
    url: "/sass/user/mobile/getAssignUser",
    method: "get",
    params
  });
};

/**
 * 设置开始时间
 */
export const setStartTime = data => {
  return request({
    url: "/crm/info/setStartTime",
    method: "post",
    data
  });
};


/**
 * 移除分配
 */
export const removeAssign = (customerId, userId, roleId) => {
  return request({
    url: `/crm/info/delete/assign/${customerId}/${userId}/${roleId}`,
    method: "delete"
  });
};